package com.feibo.controller;

import com.feibo.utils.RedisUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: zhenglinyong
 * @CreateDate: 2018/12/28 10:26 PM
 **/
@RestController
public class RedisController {

    @Autowired
    private RedisUtils redisUtils;

    @GetMapping("/getRedis")
    public String getReids() {
        redisUtils.set("name", "kingsleo");
        String result = redisUtils.get("name");
        return result;
    }
}
